package com.ysxsoft.wdg.ui.activity.th.tuan;

import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.classic.common.MultipleStatusView;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.ysxsoft.wdg.R;
import com.ysxsoft.wdg.adapter.th.TuanListAdapter;
import com.ysxsoft.wdg.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

public class TuanListActivity extends BaseActivity {


    public static void start(Context context,String tuan_id){
        Intent intent = new Intent(context,TuanListActivity.class);
        intent.putExtra("tuan_id",tuan_id);
        context.startActivity(intent);
    }

    @BindView(R.id.topView)
    View topView;
    @BindView(R.id.title_finish)
    ImageView titleFinish;
    @BindView(R.id.title_content)
    TextView titleContent;
    @BindView(R.id.recyclerview)
    RecyclerView recyclerview;
    @BindView(R.id.refreshLayout)
    SmartRefreshLayout refreshLayout;
    @BindView(R.id.multStatusView)
    MultipleStatusView multStatusView;

    private TuanListAdapter adapter;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_list;
    }

    @Override
    protected void initData() {
        initStatusBar(topView,false);
        titleContent.setText("团购列表");

        adapter = new TuanListAdapter(R.layout.item_pt_join);
        recyclerview.setLayoutManager(new LinearLayoutManager(mContext));
        recyclerview.setAdapter(adapter);

        List<String> list = new ArrayList<>();
        list.add("");
        list.add("");
        list.add("");
        list.add("");
        list.add("");
        adapter.setNewData(list);
    }

    @Override
    protected void setListener() {

    }


    @OnClick(R.id.title_finish)
    public void onViewClicked() {
        finish();
    }
}
